package com.example.hotel.pojo;

import com.fasterxml.jackson.annotation.JsonAlias;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import net.minidev.json.annotate.JsonIgnore;

@Data
//@Data注解:自动生成get(),set()，toString()方法
public class User {
    private Integer id;

    @JsonAlias(value={"userName"})
    @NotEmpty(message = "username不能为空")
    private String username;
    @JsonIgnore
    @NotEmpty(message = "password不能为空")
    private String password;

    private String nickname;
    private String phone;
    private String email;

}
